<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <style>
        #tab{
            width: 600px;
            margin: 0 auto;
        }
        .tab-tit{
            font-size: 0;
            width: 600px;
        }
        .tab-tit a{
            display: inline-block;
            height: 40px;
            line-height: 40px;
            font-size: 16px;
            width:25%;
            text-align: center;
            background: #e1e1e1;
            color: #333;
            text-decoration: none;
        }
        .tab-tit .cur{
            background: #09f;
            color: #fff;
        }
        .tab-con div{
            border: 1px solid #e7e7e7;
            height: 400px;
            padding-top: 20px;
        }
    </style>
</head>
<body>
    <div id="tab">
        <div class="tab-tit">
            <a href="javascript:;" @click="curId=0" :class="{'cur':curId===0}">第一张</a>
            <a href="javascript:;" @click="curId=1" :class="{'cur':curId===1}">第二张</a>
            <a href="javascript:;" @click="curId=2" :class="{'cur':curId===2}">第三张</a>
            <a href="javascript:;" @click="curId=3" :class="{'cur':curId===3}">第四张</a>
        </div>
        <div class="tab-con">
            <div v-show="curId===0"><img src="001.jpg" alt="" width="100%"></div>
            <div v-show="curId===1"><img src="002.jpg" alt="" width="100%"></div>
            <div v-show="curId===2"><img src="003.jpg" alt="" width="100%"></div>
            <div v-show="curId===3"><img src="004.jpg" alt="" width="100%"></div>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: '#tab',
        data:{
            curId: 0
        }
    })
</script>
</html>